//
//  WaitPayTableViewCell.m
//  GoodWayClient
//
//  Created by HuiDong on 15/12/8.
//  Copyright © 2015年 HuiDong. All rights reserved.
//

#import "WaitPayTableViewCell.h"

@interface WaitPayTableViewCell ()
@property (weak, nonatomic) IBOutlet UILabel *ordernumber;
@property (weak, nonatomic) IBOutlet UILabel *time;
@property (weak, nonatomic) IBOutlet UIImageView *image;
@property (weak, nonatomic) IBOutlet UILabel *discri;
@property (weak, nonatomic) IBOutlet UILabel *money;


- (IBAction)gotoPay:(UIButton *)sender;
@end

@implementation WaitPayTableViewCell

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

+ (instancetype) WaitPayWithTableView:(UITableView *)tableView
{
    static NSString *identifier = @"cell";
    WaitPayTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:identifier];
    if (cell == nil) {
        cell = [[[NSBundle mainBundle] loadNibNamed:@"WaitPayTableViewCell" owner:nil options:nil] lastObject];
    }
    return cell;
}

- (void)setDic:(NSDictionary *)dic
{
    _dic = dic;
    self.ordernumber.text = dic[@"ordernumber"];
    self.time.text = dic[@"time"];
    self.image.image = [UIImage imageNamed:dic[@"image"]];
    self.discri.text = dic[@"discri"];
    self.money.text = dic[@"money"];
}


//去付款方法
- (IBAction)gotoPay:(UIButton *)sender {
    [self.delegate goPay];
}
@end
